<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <script src="${pageContext.request.contextPath}/resources/js/jquery.min.js" type="text/javascript"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/bootstrap.min.css">
    <script src="${pageContext.request.contextPath}/resources/js/bootstrap.min.js" type="text/javascript"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/login.css" type="text/css">
</head>
<body>
<div class="div_all">
    <div class="row">
        <div class="col-sm-6 col-md-3">
            <img class="img_1" src="${pageContext.request.contextPath}/resources/images/login/student.jpg">
        </div>
    </div>
    <form action="<%=request.getContextPath()%>/login?action=login" method="post"  class="bs-example bs-example-form"
          role="form">
        <input type="hidden" name="identity" value="student">
        <div class="page-header">
            <h1>学生登录
                <a href="javascript:void(0)">
                    <small><a href="${pageContext.request.contextPath}/jsp/teacher/login.jsp">切换</a></small>
                </a>
            </h1>
        </div>
        <br>
        <div class="input-group">
            <span class="input-group-addon">账&nbsp&nbsp&nbsp号</span>
            <input type="text" class="form-control" name="username" placeholder="请输入账号">
        </div>
        <br>
        <div class="input-group">
            <span class="input-group-addon">密&nbsp&nbsp&nbsp码</span>
            <input type="password" class="form-control" name="password" placeholder="请输入密码">
        </div>
        <br>
        <div class="input-group">
            <span class="input-group-addon">验证码</span>
            <input type="text" class="form-control" name="validateCode" placeholder="请输入验证码">
            <span class="input-group-btn">
                <img class="img_2"  src="<%=request.getContextPath()%>/ValidateCode.jpg"
                     onclick="this.src='<%=request.getContextPath()%>/ValidateCode.jpg?d='+Math.random()">
            </span>
        </div>
        <br>

        <p id="errValidateCode"><%
            if (request.getSession().getAttribute("err") != null) {
                out.print(request.getSession().getAttribute("err"));
            }
            request.getSession().removeAttribute("err");
        %></p>

        <div class="checkbox">
            <label>
                <input type="checkbox" name="checkbox"> 两周内免登录
            </label>
        </div>
        <input type="submit" class="btn btn-primary" value="登录">
        <a href="forgetPassword.jsp" class="btn btn-primary">忘记密码</a>
    </form>
</div>
</body>
</html>
